home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / mcode_01 / source / general / getpath.s < prev    next >
Encoding:
Text File  |  1995-04-27  |  949 b   |  31 lines

  1. * Program     : Gets the current path into a buffer
  2. * Author    : Stephen McNabb
  3. * Creation date : 16th February 1995
  4. * Last update    : 16th February 1995
  5. * Parameters    : Drive letter 0=Default, 1=A, 2=B etc.
  6. *          Address of 64 byte buffer
  7. * Output    : Current path is stored in buffer
  8.  
  9. start:    jsr    cls        /clear the screen
  10.     move.w    #0,-(sp)    /move drive number to stack
  11.     move.l    #buffer,-(sp)    /move address of buffer to stack
  12.     move.w    #$47,-(sp)    /use Dgetpath() function
  13.     trap    #1        /use gemdos
  14.     addq.l    #8,-(sp)    /tidy up stack
  15.     
  16.     move.l    #text,d0    /move address of string to d0
  17.     jsr    ptext        /and display on screen
  18.     
  19.     move.l    #buffer,d0    /move address of path string to d0
  20.     jsr    ptext        /and print to screen
  21.     
  22.     jsr    exit        /exit from program
  23.  
  24.     include    "\SOURCE\FUNCTION.S"    /include standard functions
  25.  
  26. *** Program Data ***
  27.  
  28. buffer:    ds.b    64        /64byte buffer to hold path string
  29. text:    dc.b    'You are currently in the directory ',0
  30.  
  31. *** End of file ***